package com.lk.wz.action.common;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;

import com.lk.wz.dao.CateGoryDao;
import com.lk.wz.dao.impl.CateGoryDaoImpl;

public class MainAction extends HttpServlet{

	@Override
	public void service(ServletRequest request, ServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		CateGoryDao cateGoryDao=new CateGoryDaoImpl();
		Map<String,List<String>> map=cateGoryDao.getCateGoryList();
		request.setAttribute("categoryList", map);
		RequestDispatcher dispa=request.getRequestDispatcher("index.jsp");
		dispa.forward(request, response);
	}
	
}
